/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.siteEncheres.client;

import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.History;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.VerticalPanel;

/**
 *
 * @author Damador
 */
class IhmActionMenu extends Composite {
    public IhmActionMenu() 
    {
        VerticalPanel verticalPanel = new VerticalPanel();
        verticalPanel.addStyleName("panelBouton");
        
        initWidget(verticalPanel);
        
        verticalPanel.setSize("100%", "100%");

        Button btnSinscrire = new Button("S'inscrire");
        verticalPanel.add(btnSinscrire);
        btnSinscrire.setSize("100%", "40px");

        Button btnGererSeance = new Button("Creer une seance");
        verticalPanel.add(btnGererSeance);
        btnGererSeance.setSize("100%", "40px");

        Button btnCompte = new Button("Gérer mon compte");
        verticalPanel.add(btnCompte);
        btnCompte.setSize("100%", "40px");
        
        Button btnModifierProfil = new Button("Modifier mon profil");
        verticalPanel.add(btnModifierProfil);
        btnModifierProfil.setSize("100%", "40px");
        
        
        btnSinscrire.addClickHandler(new ClickHandler() {

            @Override
            public void onClick(ClickEvent event) {
                History.newItem("s_inscrire");
            }
        });
        
        btnGererSeance.addClickHandler(new ClickHandler() {

            @Override
            public void onClick(ClickEvent event) {
                History.newItem("creer_seance");
            }
        });
        
        btnModifierProfil.addClickHandler(new ClickHandler() {

            @Override
            public void onClick(ClickEvent event) {
                History.newItem("modifier_profil");
            }
        });
        
        btnCompte.addClickHandler(new ClickHandler() {

            @Override
            public void onClick(ClickEvent event) {
                History.newItem("gerer_compte");
            }
        });
    }
}
